/*
 * @Author: likang xie
 * @Date: 2020-09-10 16:52:03
 * @Purpose: 重置u-view样式
 */

html,
page {
  // 头像图片
  .u-avatar,
  .u-image {
    display: block !important;
  }

  // 按钮
  .u-btn {
    &.u-size-mini {
      min-width: 150rpx;
      height: 65rpx;
      line-height: 65rpx;
      padding: 0 25rpx;
      font-size: 24rpx;
    }

    &.u-size-medium {
      min-width: 250rpx;
      height: 75rpx;
      line-height: 75rpx;
      padding: 0 25rpx;
      font-size: 28rpx;
    }

    &.u-size-default {
      height: 90rpx;
      line-height: 90rpx;
    }

    &.u-btn--clear {
      display: inline-block;
      font-size: 28rpx;
      height: unset;
      padding: 0;
      background-color: transparent;

      &::after {
        border: unset;
      }
    }

    &.u-btn--transparent {
      color: #ffffff;
      background-color: transparent;

      &::after {
        border-color: #ffffff;
      }
    }

    &[class*="plain"] {
      background-color: transparent !important;

      &[class*="hover"] {
        color: inherit !important;
      }
    }

    &.u-btn--info {
      background-color: gray;

      &::after {
        border: none;
      }
    }
  }

  // 标签
  .u-tag {
    margin: 0 10rpx 10rpx 0;

    &.u-size-default {
      padding: 15rpx 22rpx;
    }

    &.u-size-mini {
      font-size: 24rpx;
    }

    &.u-mode-dark-info {
      color: $u-tips-color;
    }
  }

  // 单元格
  .u-cell-box {
    .u-cell {
      .u-cell_title {
        color: $u-main-color;
      }

      .u-cell__value {
        color: $u-content-color;
        font-size: 28rpx;
      }

      .u-icon {
        &.u-icon--right {
          .u-icon__icon {
            &::before {
              color: $u-content-color;
            }
          }
        }
      }
    }
  }

  // 输入框
  .u-input {
    .uni-input-input {
      color: $u-main-color;
    }

    .uni-input-placeholder {
      color: $u-content-color !important;
    }
  }

  .u-input-circle {
    .u-input {
      .uni-input-input {
        padding: 10rpx 30rpx;
        border-radius: 100rpx;
        background-color: gray;
        color: #ffffff;
      }

      .uni-input-placeholder {
        padding: 10rpx 30rpx;
        color: #ffffff !important;
      }
    }
  }

  // 规则表单
  .rule-form {
    .u-form {
      .u-form-item {
        .u-form-item--left {
          width: unset !important;
          flex: unset !important;

          .u-form-item--left__content {
            font-weight: bolder;
            font-size: 30rpx;

            .u-form-item--left__content__icon {
              display: flex;
              align-items: center;
            }
          }
        }

        .uicon-arrow-down-fill {
          &::before {
            content: "\e605";
          }
        }
      }

      .u-form-item__body {
        position: relative;
      }

      .u-tag {
        margin-bottom: 0;
      }

      .attachment-btn {
        position: absolute;
        top: 10rpx;
        right: 0;
      }
    }

    // 输入框、错误提示居右
    &.rule-form-input-right {
      .u-form {
        .u-form-item {
          .u-form-item--right__content__slot {
            justify-content: flex-end;
            line-height: 1.5 !important;
          }

          input,
          .u-form-item__message {
            text-align: right !important;
          }
        }
      }
    }

    // 错误提示居左
    &.rule-form-error-left {
      .u-form {
        .u-form-item {
          .u-form-item__message {
            padding-left: 0 !important;
          }
        }
      }
    }

    // 输入框白色背景
    &.rule-form-input-white {
      .u-form {
        .u-form-item {
          background-color: #ffffff;
          padding: 10rpx 30rpx;
          border-radius: 100rpx;
        }
      }
    }

    // 输入框大号字体
    &.rule-form-input-large {
      .u-form {
        .u-form-item {
          input {
            font-size: 40rpx !important;
            font-weight: bolder;
          }
        }
      }
    }
  }

  // 单选框
  .u-radio {
    margin-left: 20rpx;

    .u-radio__label {
      font-size: 28rpx;
      color: $u-main-color;
      margin-right: 0;
    }
  }

  // 复选框
  .u-checkbox {
    .u-checkbox__label {
      font-size: 28rpx;
    }
  }

  // 加载更多
  .u-load-more-wrap {
    .u-more-text {
      font-size: 24rpx !important;
      color: $u-content-color !important;
    }
  }

  // 轮播图
  .u-swiper-wrap {
    border-radius: 0;

    .u-list-image-wrap {
      border-radius: 0;
    }
  }

  // 滑动
  u-swipe-action,
  .u-swipe-action {
    width: 100% !important;
  }

  .u-swipe-view {
    width: calc(100% + 360rpx) !important;
  }

  // 消息红点
  .u-badge {
    &.u-badge-dot {
      &.u-badge-mini {
        width: 10rpx;
        height: 10rpx;
        border-radius: 50%;
        padding: 0;
      }
    }
  }
}
